package com.cold.demo.rabbitmq;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfigurationExcludeFilter;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.TypeExcludeFilter;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

import java.util.regex.Pattern;

@SpringBootApplication
@ComponentScan(excludeFilters = {
        @ComponentScan.Filter(type = FilterType.REGEX, pattern = {"com\\.cold\\.demo\\.rabbitmq\\.demo\\..*"}
        )})
public class RabbitmqSpringbootApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(RabbitmqSpringbootApplication.class, args);

//        String regex = "com\\.cold\\.demo\\.rabbitmq\\.demo\\..*";
//        System.out.println(Pattern.compile(regex).matcher("com.cold.demo.rabbitmq.demo.direct.DirectConfig").matches());
//        System.out.println(Pattern.compile(regex).matcher("com.cold.demo.rabbitmq.demo3.direct.DirectConfig").matches());
    }

}
